/**
 * 
 */
package com.aibili.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 活动信息表
 * 
 * @author qiuch
 * 
 */
@Entity
@Table(name = "t_event_info")
public class EventInfo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6734740117231616299L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", length = 11, nullable = false)
	private long id;

	@Column(name = "event_name")
	private String event_name;

	@Column(name = "event_type")
	private String event_type;

	@OneToOne(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER, targetEntity = UserInfo.class)
	@JoinColumn(name = "user_id", nullable = false, updatable = false)
	private UserInfo user;// 发起人

	@Column(name = "place")
	private String place;// 活动地点

	@Column(name = "intro")
	private String intro;// 简介(要求)

	@Column(name = "event_time", columnDefinition = "TIMESTAMP default CURRENT_TIMESTAMP")
	private Date event_time;// 活动举行时间

	@Column(name = "create_time", columnDefinition = "TIMESTAMP default CURRENT_TIMESTAMP")
	private Date create_time;// 活动发布时间

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getEvent_name() {
		return event_name;
	}

	public void setEvent_name(String event_name) {
		this.event_name = event_name;
	}

	public String getEvent_type() {
		return event_type;
	}

	public void setEvent_type(String event_type) {
		this.event_type = event_type;
	}

	public UserInfo getUser() {
		return user;
	}

	public void setUser(UserInfo user) {
		this.user = user;
	}

	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public Date getEvent_time() {
		return event_time;
	}

	public void setEvent_time(Date event_time) {
		this.event_time = event_time;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
